package contract

import (
	"github.com/ethereum/go-ethereum/core/types"
	"github.com/ethereum/go-ethereum/ethclient"
)

//func SandToken(client *ethclient.Client, privateKey *ecdsa.PrivateKey, tokenAddress common.Address, toAddress common.Address, value *big.Int) (*types.Transaction, error) {
//	tx, err := SendTransaction(client, privateKey, tokenAddress, evmAbi.ERC20_ABI, "transfer", toAddress, value)
//	if err != nil {
//		return nil, err
//	}
//	return tx, nil
//}

func SandToken(client *ethclient.Client, businessId string, to string, rpcUrl string, value string, tokenAddress string) (*types.Transaction, error) {
	tx, err := GetTransactionSign(client, businessId, to, rpcUrl, value, tokenAddress)
	if err != nil {
		return nil, err
	}
	return tx, nil
}
